<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="baidu-site-verification" content="mQzDYq8fHL" />
    <meta name="keywords" content="云钢联合,废旧、二手、废钢、二手设备、闲置设备拆除、废料、废电缆、废电机、报废车辆">
    <meta name="description" content="云钢联合,废钢材、冶金设备、废铜套、招标、拍卖、钢厂废旧物资、废旧次材、整厂拆除">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>云钢拍卖</title>
    <link href="css/base.css" rel="stylesheet" type="text/css"/>
    <link href="css/css.css" rel="stylesheet" type="text/css"/>
    <link href="css/style1.css" rel="stylesheet" type="text/css"/>
    <link href="css/common.css" rel="stylesheet" type="text/css"/>

    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.2/lib/index.css">

    <style>
        img {
            max-width: none;
        }

        .tb-pic a {
            display: table-cell;
            text-align: center;
            vertical-align: middle;
        }

        .tb-pic a img {
            vertical-align: middle;
            width: 100%;
            height: 100%;
        }

        .tb-pic a {
            *display: block;
            *font-family: Arial;
            *line-height: 1;
        }

        .tb-thumb {
            margin: 10px 0 0;
            overflow: hidden;
        }

        .tb-thumb li {
            float: left;
            width: 86px;
            height: 86px;
            overflow: hidden;
            border: 1px solid #cdcdcd;
            margin-right: 5px;
        }

        .tb-thumb li:hover, .tb-thumb .tb-selected {
            width: 84px;
            height: 84px;
            border: 2px solid #3A7ACD;
        }

        .tb-s310, .tb-s310 a {
            height: 365px;
            width: 365px;
        }

        .tb-s310, .tb-s310 img {
            max-height: 365px;
            max-width: 365px;
        }

        .tb-booth {
            border: 1px solid #CDCDCD;
            position: relative;
            z-index: 1;
        }

        div.zoomDiv {
            z-index: 999;
            position: absolute;
            top: 0px;
            left: 0px;
            background: #ffffff;
            border: 1px solid #ccc;
            display: none;
            overflow: hidden;
        }

        div.zoomMask {
            position: absolute;
            background: url("images/mask.png") repeat;
            cursor: move;
            z-index: 1;
        }

        <!--
        弹出隐藏层-- >
        .black_overlay {
            display: none;
            position: absolute;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 1200px;
            background-color: black;
            z-index: 9999;
            -moz-opacity: 0.4;
            opacity: 0.40;
            filter: alpha(opacity=40);
        }

        .white_content {
            display: none;
            position: absolute;
            top: 20%;
            left: 25%;
            width: 800px;
            height: 400px;
            border: none;
            background-color: white;
            z-index: 100200;
            overflow: auto;
        }

        .white_content_small {
            display: none;
            position: absolute;
            top: 20%;
            left: 30%;
            width: 40%;
            height: 50%;
            background-color: white;
            z-index: 1002;
            overflow: auto;
        }

        .dialogbox {
            padding: 20px;
            line-height: 40px;
        }

        .addbtn {
            width: 22px;
            height: 22px;
            background: url(images/close2.png) no-repeat;
            margin-right: 5px;
            margin-top: 3px;
            border: none;
            float: right;
        }
        .rules p{
            margin-top: 5px;
            font-size: 14px;
        }
        .el-input-number .el-icon-plus, .el-input-number .el-icon-minus{
            line-height: 26px !important;
        }
        .el-input input {
            text-align: center;
        }
    </style>
</head>

<body>

<!--头部导航-->
<div class="nofix_head">
    <div class="top wrapper">
        <div class="float-lt margin-b10">
            <ul>
                <li><a href="login.html" target="_blank" class=" colororange unlogin">请登录</a></li>
                <li><a href="register.html" target="_blank" class="unlogin">免费注册</a></li>
                <li><a href="JavaScript:void (0)">欢迎使用云钢综合平台</a></li>
            </ul>
        </div>
        <div class="float-rt">
            <ul>
                <li><a href="index.html" target="_blank">首页</a></li>
                <!--<li><a href="">我要处置</a></li>-->
                <!--<li><a href="">我要求购</a></li>-->
                <li><a href="user.html">个人中心</a></li>
            </ul>
        </div>
    </div>
</div>
<!--头部导航END-->

<div class="clear">&nbsp;</div>

<!--网站头部-->
<div class="sup-wid">
    <div class="supplie-top">
        <div class="clear">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="nav"></table>
        </div>
        <div class="clear bread">
            <a href="index.html">首页</a> <span class="pipe">&gt;</span>
            <a href="biddingList.html">云钢拍卖</a> <span class="pipe">&gt;</span>
            <a href="#" class="product_body">详情</a>
        </div>
    </div>

    <!-- Vue -->
    <div id="app">
        <div class="pro_detail" id="Details" v-cloak>
            <div class="pro_detail_img float-lt">
                <div class="gallery">
                    <div class="tb-booth tb-pic tb-s310">
                        <a :href="auction.thumbnail">
                            <img :src="auction.thumbnail" alt="云钢联合,竞价中心" :rel="auction.thumbnail" class="jqzoom"/>
                        </a>
                    </div>
                </div>
                <input type="button" value="加入收藏" class="addcart" @click="collect" :style="btnCollectStyle"/>
            </div>

            <div class="float-lt pro_detail_con">
                <div class="pro_detail_tit">项目名称：{{auction.title}}</div>
                <div class="pro_detail_ad">商家：{{auction.enterpriseName}}</div>
                <div class="pro_detail_price  margin-t20"><span class="margin-r20">项目编号：{{auction.no}}</span><span class="margin-r20">处置方式：{{auction.handleMode | mode}}</span></div>
                <div class="pro_detail_price  margin-t20"><span class="margin-r20">招标形式：{{auction.channelId | channel}}</span><span class="margin-r20">刷新时间：{{(auction.refreshAt > 0 ? auction.refreshAt : auction.createdAt) | formatDate}}</span></div>
                <div class="pro_detail_price  margin-t20"><span class="margin-r20">物资名称：{{auction.substanceName}}</span><span class="margin-r20">出价形式：{{auction.scopeMode | scope}}</span></div>
                <div class="pro_detail_price  margin-t20"><span class="margin-r20">保证金金额：{{auction.deposit}}</span><span class="margin-r20">其他要求：{{auction.moreRequirement}}</span></div>
                <div class="pro_detail_price  margin-t20"><span class="margin-r20">竞买人要求：{{auction.bidderRequirement | requirement}}</span><span class="margin-r20">冶金工程施工资质要求：{{auction.metallurgyQualification | metallurgy}}</span></div>
                <div class="pro_detail_price  margin-t20"><span class="margin-r20">建筑工程施工资质要求：{{auction.architecturalQualification | architectural}}</span><span class="margin-r20">安全资质要求：{{auction.securityQualification | security}}</span></div>
                <div class="pro_detail_price  margin-t20"><span style="width: 100%">竞拍日期：{{auction.beginAt | formatDate}}</span></div>
                <div class="clear"></div>
                <div class="pro_detail_btn margin-t30">
                    <ul>
                        <li class="pro_detail_shop" v-if="auction.status < 2"><a @click="join">我要参与</a></li>
                        <li class="pro_detail_add"><a :href="`factoryDetails.html?id=${auction.enterpriseId}`">查看卖家店铺</a></li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="clear"></div>
        <div class="pro_con margin-t55" style="overflow:hidden;">
            <div class="pro_tab">
                <ul>
                    <li class="cur">图片清单</li>
                    <li>招标公告</li>
                    <li>场次公告</li>
                    <li>拼盘详情</li>
                </ul>
            </div>
            <div class="conlist">
                <div class="conbox" style="display:block;">
                    <button onclick="downloadFile()" style="margin-bottom: 20px">下载附件</button>
                    <ul id="thumblist" v-cloak>
                        <li  v-for="(item, index) in galleries" style="float: left;margin-right: 15px;margin-top: 15px">
                            <a :href="item.url" target="_blank"><img style="width: 200px;height: 200px" :src="item.url"></a>
                        </li>
                    </ul>
                </div>
                <div class="conbox">
                    <div class="rules">
                        <p>平台竞价规则：</p>
                        <template v-if="auction.auctionContent">
                            <div style="white-space: pre-wrap" v-html="auction.auctionContent"></div>
                        </template>
                    </div>
                </div>
                <div class="conbox">
                    <div  class="rules">
                        <p>场次竞价规则：</p>
                        <template v-if="auction.bidContent">
                            <div style="white-space: pre-wrap" v-html="auction.bidContent"></div>
                        </template>
                    </div>
                </div>
                <div class="conbox">
                    <div class="clear">
                        <table width="100%" border="0" cellpadding="0" class="details-table" cellspacing="0" v-cloak>
                            <tr>
                                <th align="center"><a href="#">序号</a></th>
                                <th align="center"><a href="#">物资名称</a></th>
                                <th align="center"><a href="#">规格型号</a></th>
                                <th align="center"><a href="#">材质</a></th>
                                <th align="center"><a href="#">估重</a></th>
                                <th align="center"><a href="#">单位</a></th>
                                <th align="center"><a href="#">价格单位</a></th>
                                <th align="center"><a href="#">操作</a></th>
                            </tr>
                            <tr v-for="(item, index) in items">
                                <td>{{index+1}}</td>
                                <td>{{item.substanceName}}</td>
                                <td>{{item.projectSpecification}}</td>
                                <td>{{item.texture}}</td>
                                <td>{{item.revaluation}}</td>
                                <td>{{item.unit}}</td>
                                <td>{{item.priceUnit | priceUnit}}</td>
                                <td>
                                    <template v-if="auction.status === '1'">
                                        <el-button v-if="item.stage === 'contend'" :data-index="index" @click="bid(item)">我要出价</el-button>
                                        <el-button v-else-if="item.stage === 'append'" @click="append(item)">我要加价</el-button>
                                        <el-tag v-else type="info">已结束</el-tag>
                                    </template>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div class="helper">
            <div class="mod">
                <div class="mod-wrap">
                    <h4><img src="images/h1.png" width="60" height="60"/><span>新手上路</span></h4>
                </div>
            </div>
            <div class="mod">
                <div class="mod-wrap">
                    <h4><img src="images/h2.png" width="60" height="60"/><span>如何支付</span></h4>
                </div>
            </div>
            <div class="mod">
                <div class="mod-wrap">
                    <h4><img src="images/h3.png" width="60" height="60"/><span>配送运输</span></h4>
                </div>
            </div>
            <div class="mod mod-last">
                <div class="mod-wrap">
                    <h4><img src="images/h4.png" width="60" height="60"/><span>售后服务</span></h4>
                </div>
            </div>
            <div class="mod mod-last">
                <div class="mod-wrap">
                    <h4><img src="images/h5.png" width="60" height="60"/><span>联系我们</span></h4>
                </div>
            </div>
        </div>

        <!--我要出价-->
        <el-dialog
                title="出价"
                :before-close="handleClose"
                :visible.sync="visible"
                width="60%">

            <el-row :gutter="20">
                <el-col :span="16">
                    <div class="grid-content bg-purple">
                        <el-table :data="bidList" height="400px" style="width: 100%;" border>
                            <el-table-column type="index" label="序号" width="60">
                                <template slot-scope="scope">{{ bidList.length - scope.$index }}</template>
                            </el-table-column>
                            <el-table-column label="拼盘名称">
                                <template slot-scope="scope">{{bidSubstanceName}}</template>
                            </el-table-column>
                            <el-table-column property="amount" label="出价金额"></el-table-column>
                            <el-table-column label="出价梯度" width="80">
                                <template slot-scope="scope">{{ (scope.row.amount - item.beginAmount) / item.stepAmount }}</template>
                            </el-table-column>
                            <el-table-column property="bidderNo" label="出价人"></el-table-column>
                            <el-table-column label="出价时间" width="160">
                                <template slot-scope="scope">{{ scope.row.createdAt | formatDate}}</template>
                            </el-table-column>
                        </el-table>

                        <div style="color: #909399">
                            服务器时间：{{timestamp | formatDate}}
                        </div>
                    </div>
                </el-col>
                <el-col :span="8">
                    <div class="grid-content bg-purple">
                        <!-- 当前最高价及梯度 -->
                        <div class="pro_detail_tit">
                            当前最高：{{item.amount}}
                            <span @click="refresh(true)" style="margin-left: 15px; color: #409EFF; font-weight: 100; cursor: pointer;">{{loading ? '刷新中' : '刷新'}}</span>
                        </div>
                        <div class="pro_detail_tit">出价梯度：{{item.stepAmount}}</div>

                        <template v-if="auction.status === '1' && auction.auctionEndAt < 1">
                            <div class="pro_detail_tit">起拍金额：{{item.beginAmount}}</div>
                            <div class="pro_detail_tit">您的出价：{{item.myAmount}}</div>
                            <div class="pro_detail_tit">您的状态：{{item.myAmount >= item.amount ? '领先' : '落后'}}</div>
                        </template>

                        <div class="pro_detail_tit">加价梯度：
                            <el-input-number v-model="multiple" @change="valueOnChanged" :min="1" :step="1" step-strictly label="出价器" size="mini" style="width: 100px;"></el-input-number>
                        </div>
                        <div class="pro_detail_tit">本次出价：{{item.amount + item.fee}}</div>
                        <div class="clear"></div>

                        <div :style="{display: countDownTime > 0 ? '' : 'none'}" style="text-align: center; font-size:20px; padding: 20px 0px;">
                            <van-count-down ref="countDown" millisecond :time="countDownTime" format="mm分ss秒" style="font-size: 28px; color: #F37A1D">
                            </van-count-down>
                            <p style="text-align: center; padding-top: 15px;">
                                后结束竞价
                            </p>
                        </div>

                        <!-- <template v-if="auction.status === '2' && auction.finallyAt < parseInt(new Date().getTime() / 1000) - 5 * 60">
                        </template> -->
                        <span slot="footer" class="dialog-footer">
                            <el-button @click="visible = false">取 消</el-button>
                            <el-button type="primary" @click="addAmount" :loading="isSubmiting">确认出价</el-button>
                        </span>
                    </div>
                </el-col>
            </el-row>
        </el-dialog>

        <!-- 我要加价 -->
        <el-dialog
            title="加价"
            :visible.sync="isShowAppend">
            <div style="text-align: center;">
                <p>当前最高价</p>
                <p style=" font-size: 30px; padding: 20px 0px; color: #FF3300">{{item.amount}}</p>
            </div>

            <div style="text-align: center;">
                输入加价金额
            </div>

            <div style="text-align: center; padding: 10px 0px">
                <el-input v-model="appendAmount" placeholder="在最高价格的基础上加价" style="text-align: center; width: 50%;"></el-input>
            </div>

            <div style="text-align: center;">
                您的最终出价：{{latestAmount}}
            </div>
            <div style="padding-top: 20px; text-align: center;">
                <el-button @click="addLastAmount">确认加价</el-button>
            </div>
        </el-dialog>
    </div>
</div>

<div class="clear">&nbsp;</div>


<div class="footerpage"></div>


<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="js/vue.js"></script>
<script type="text/javascript" src="js/jquery.simpleGal.js"></script>
<script type="text/javascript" src="js/jquery.imagezoom.min.js"></script>
<script type="text/javascript" src="js/common_js.js"></script>

<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vant@2.2/lib/vant.min.js"></script>

<script>
    $(function () {
        $(".pro_tab li").each(function (i) {
            $(this).click(function () {
                $(this).addClass("cur").siblings().removeClass("cur");
                $(".conlist .conbox").eq(i).show().siblings().hide();
            })
        })

        $(".footerpage").load("footer.html");

        $(".jqzoom").imagezoom();

        $("#thumblist li a").mousemove(function () {
            $(this).parents("li").addClass("tb-selected").siblings().removeClass("tb-selected");
            $(".jqzoom").attr('src', $(this).find("img").attr("mid"));
            $(".jqzoom").attr('rel', $(this).find("img").attr("big"));
        });

    });
</script>

<script>
    let timer = null
    const app = new Vue({
        el: '#app',
        data: {
            id: 0,
            auction: {},
            bidList: [],
            items: [],
            bidSubstanceName: '',
            item: {
                beginAmount: 0, // 起拍价
                stepAmount: 0,  // 加价梯度
                myAmount: 0,    // 我的出价
                fee: 0,         // 本次出价金额
                amount: 0       // 当前拼盘最高价格
            },
            multiple: 0,            // 出价倍数
            galleries: [],          // 图库
            btnCollectStyle: {},    // 收藏按钮样式
            visible: false,         // 出价框显示状态
            loading: false,         // 是否正在获取最高出价
            isSubmiting: false,     // 是否正在提交报价
            isShowAppend: false,    // 显示加价
            timestamp: 0,           // 服务器时间戳
            countDownTime: 0,       // 倒计时时间戳
            appendAmount: ''
        },
        computed: {
            latestAmount() {
                return parseFloat(this.item.amount || 0) + parseFloat(this.appendAmount || 0)
            }
        },
        mounted: function() {

            this.id = getUrlParam('id')

            const self = this
            getToken(function (token) {

                ajax(`/auction/${self.id}`, 'GET', '', token, (data) => {
                    self.auction = data.data
                })

                // 图库列表
                ajax(`/gallery/1/${self.id}`, 'GET', '', token, (data) => {
                    self.galleries = data.data
                })

                ajax('/auction/public/getNowTimestamp/', 'GET', '', token, (data) => {
                    self.timestamp = data.data
                    self.$nextTick(() => {
                        self.timer()
                    })
                })
            })

            this.refreshLots()
        },
        methods: {
            /**
             * 加入竞拍
             */
            join() {
                const self = this
                this.$confirm('我已阅读招标公告、场次公告、拼盘信息，并已实地现场确认核实过物资情况，现我参与此场次，我为我此场次的所有出价行为负全部的法律责任！', '请确认', {
                    showConfirmButton: true,
                    confirmButtonText: '同意'
                })
                    .then(() => {
                        getToken(function (token) {
                            ajax('/auction/join','POST',{id: self.id},token,function (data) {
                                self.$message({
                                    type: 'success',
                                    message: '参与成功'
                                })
                            })
                        })
                    })
                    .catch(action => {
                    });
            },
            /**
             * 收藏竞拍
             */
            collect() {
                const self = this
                getToken(function (token) {
                    ajax('/auction/following','POST',{enterpriseId: self.id},token,function (data) {
                        self.$message({
                            type: 'success',
                            message: '收藏成功'
                        })

                        self.btnCollectStyle = {'background-image': `url('images/iconfont-xingxingman_add.png')`}
                    })
                })
            },
            /**
             * 提交出价
             */
            addAmount() {
                if(isNaN(this.item.fee) || (this.item.amount > 0 && this.item.fee < 1)){
                    this.$message.error('请输入出价金额')
                    return
                }
                if(!(/^\d+(\.\d+)?$/.test(this.item.fee))){
                    this.$message({
                        type: 'error',
                        message: '请输入合法的出价金额'
                    })
                    return
                }

                if(this.isSubmiting){
                    return
                }

                const amount = parseFloat(this.item.fee) + parseFloat(this.item.amount || this.item.beginAmount)
                const self = this
                this.isSubmiting = true
                getToken(function (token) {
                    ajaxCallback('/lot/bid','POST',{ id: self.item.id, amount: amount }, token, (data) => {
                        self.isSubmiting = false
                        if(data.errCode !== 0) {
                            self.$message.error(data.msg)
                            return
                        }

                        self.refreshLots()
                        self.$message({
                            type: 'success',
                            message: '出价成功'
                        })

                        self.item.amount += self.item.fee
                        self.item.myAmount = self.item.amount
                        self.multiple = 1
                        self.valueOnChanged()
                    })
                })
            },
            /**
             * 最后加价金额
             */
            addLastAmount() {
                const self = this
                this.$confirm('您只有一次加价机会，请谨慎操作!', '请确认', {
                    cancelButtonText: '我再想想',
                    confirmButtonText: '确认加价'
                })
                    .then(() => {
                        getToken(function (token) {
                            ajaxCallback('/lot/append','POST',{id: self.item.id, amount: self.appendAmount},token,function (data) {
                                if(data.errCode !== 0) {
                                    self.$message({
                                        type: 'error',
                                        message: data.msg
                                    })
                                    return
                                }

                                self.$message({
                                    type: 'success',
                                    message: '已完成加价'
                                })

                                this.isShowAppend = false
                            })
                        })
                    })
                    .catch(action => {
                    });
            },
            /**
             * 弹出出价框
             */
            bid(row) {

                // 重置出价信息
                this.item = {
                    id: row.id,
                    beginAmount: row.beginAmount,
                    stepAmount: row.stepAmount,
                    amount: row.amount < 1 ? row.beginAmount : 0,
                    myAmount: 0,
                    fee: row.amount < 1 ? row.beginAmount : row.stepAmount
                }
                this.bidSubstanceName = row.substanceName

                // 重置加价梯度值
                this.multiple = 1
                // 重置加价历史列表
                this.bidList = []
                // 重置本次出价金额
                this.valueOnChanged()

                this.visible = true
                const self = this
                /**
                 * 获取我的出价
                 */
                getToken(function (token) {
                    ajax(`/auctionTogether/my/highest?id=${self.item.id}`, 'GET', '', token, (data) => {
                        self.item.myAmount = data && data.data ? data.data.amount : 0

                        self.auto()
                    })

                    ajax('/auction/online', 'POST', {auctionId: self.auction.id}, token, (data) => {

                    })
                })
            },
            append(row) {
                this.item = {
                    id: row.id,
                    beginAmount: row.beginAmount,
                    stepAmount: row.stepAmount,
                    amount: row.amount,
                    myAmount: 0,
                    fee: row.amount < 1 ? row.beginAmount : row.amount
                }
                this.isShowAppend = true
            },
            /**
             * 手动刷新最高价及出价记录
             */
            refresh(force) {
                if(this.item == undefined || this.item == null || this.item.id == undefined || this.item.id < 1){
                    return
                }

                if(force == undefined && this.loading){
                    return
                }

                const self = this
                getToken(function (token) {
                    self.loading = true
                    // 获取出价列表
                    ajax(`/lot/log/${self.item.id}`, 'GET', '', token, (data) => {
                        self.loading = false
                        if( ! data.data || data.data.length < 1){
                            return
                        }

                        // 有最新出价时，重置计时器
                        if(self.item.amount != data.data[0].amount && self.item.finallyAt > 0){
                            self.resetCountdownTime(5 * 60 * 1000)
                        }

                        self.item.amount = data.data[0].amount

                        const uid = self.getUserId(token)
                        self.bidList = data.data.map(val => {
                            let no = val.createdAt.toString()
                            if(no.length < 10) {
                                no = '0'.repeat(10 - uid.toString().length) + uid
                            }
                            val.bidderNo = val.bidderNo == uid ? val.bidderNo : `****${no.substring(7)}`
                            return val
                        })

                        if(force){
                            self.$message.success('刷新成功')
                        }
                    })
                })
            },
            handleClose(done) {

                clearInterval(timer)

                this.item = {
                    id: 0,
                    beginAmount: 0,
                    stepAmount: 0,
                    amount: 0,
                    myAmount: 0,
                    fee: 0
                }
                done()
            },
            /**
             * 开始倒计时
             */
            resetCountdownTime(seconds) {
                if(seconds !== undefined && ! isNaN(seconds)){
                    this.countDownTime = seconds
                }

                if(this.$refs.countDown === undefined){
                    return
                }

                this.$refs.countDown.reset()
                this.$refs.countDown.start()
            },
            // 计算本次加价金额
            valueOnChanged(){
                this.item.fee = this.multiple * this.item.stepAmount
            },
            // 计时器
            timer() {
                const self = this
                setInterval(() => {
                    self.timestamp ++
                }, 1000)
            },
            /**
             * 自动获取最新出价信息
             */
            auto() {
                timer = setInterval(() => {
                    this.refresh();
                }, 3000)
            },
            /**
             * 刷新拍品列表
             */
            refreshLots(){
                const self = this
                getToken((token) => {
                    ajax(`/lot/list/${self.id}`, 'GET', '', token, (data) => {
                        self.items = data.data
                    })
                })

            },
            /**
             * 获取Uid
             */
            getUserId(token) {
                const tokens = token.split('.');
                const result = JSON.parse(window.atob(tokens[1]))
                const user = JSON.parse(result.aud)
                return user.uid
            }
        },
        filters: {
            formatDate(value) {
                return value > 0 ? timestampToTime(value) : '-'
            },
            channel: (val) => {
                let label = ''
                switch (val) {
                    case 1:
                        label = '线上竞标'
                        break
                    case 2:
                        label = '线下竞标'
                        break
                    case 3:
                        label = '第三方平台竞标'
                        break
                }
                return label
            },
            mode: (val) => {
                let label = ''
                switch (val) {
                    case 1:
                        label = '整体打包'
                        break
                    case 2:
                        label = '分类处置'
                        break
                }
                return label
            },
            scope: (val) => {
                let label = ''
                switch (val) {
                    case '1':
                        label = '明标出价'
                        break
                    case '2':
                        label = '暗标出价'
                        break
                    case '3':
                        label = '自由出价'
                        break
                    case '4':
                        label = '降价拍'
                        break
                }
                return label
            },
            requirement: (val) => {
                let label = '不限'
                switch (val) {
                    case '1':
                        label = '企业竞买人'
                        break
                    case '2':
                        label = '个人竞买人'
                        break
                    case '3':
                        label = '不限'
                        break
                }
                return label
            },
            metallurgy: (val) => {
                let label = '不限'
                if (! val) {
                    return label
                }

                switch (val.toString()) {
                    case '1':
                        label = '特级资质'
                        break
                    case '2':
                        label = '一级资质'
                        break
                    case '3':
                        label = '二级资质'
                        break
                    case '4':
                        label = '三级资质'
                        break
                }
                return label
            },
            architectural: (val) => {
                let label = '不限'
                if (! val) {
                    return label
                }

                switch (val.toString()) {
                    case '1':
                        label = '特级资质'
                        break
                    case '2':
                        label = '一级资质'
                        break
                    case '3':
                        label = '二级资质'
                        break
                    case '4':
                        label = '三级资质'
                        break
                }
                return label
            },
            security: (val) => {
                return val === 1 ? '有' : '无'
            },
            priceUnit(val) {
                let value = ''
                switch (val) {
                    case '0':
                        break
                    case '1':
                        value = '元'
                        break
                    case '2':
                        value = '万'
                        break
                }
                return value
            }
        }
    });
</script>

</body>
</html>
